package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.BasicCostReasonMapper;
import com.whq.entity.BasicCostReason;
import com.whq.service.BasicCostReasonService;

@Service(value = "tcBasicCostReasonService")
public class BasicCostReasonServiceImpl implements BasicCostReasonService {

    @Autowired
    private BasicCostReasonMapper<BasicCostReason>tcBasicCostReasonMapper;
    
    @Override
    public Integer insertSelective(BasicCostReason tcBasicCostReason) throws Exception {
           return this.tcBasicCostReasonMapper.insertSelective(tcBasicCostReason);
        }

    @Override
    public Integer insertBatch(List<BasicCostReason> tcBasicCostReason) throws Exception {
           return this.tcBasicCostReasonMapper.insertBatch(tcBasicCostReason) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tcBasicCostReasonMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tcBasicCostReasonMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(BasicCostReason tcBasicCostReason) {
           return this.tcBasicCostReasonMapper.updateByPrimaryKeySelective(tcBasicCostReason);
    }

    @Override
    public BasicCostReason findById(Object id) {
           return (BasicCostReason) this.tcBasicCostReasonMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<BasicCostReason> selectByCondition(BasicCostReason tcBasicCostReason) {
           return (List<BasicCostReason>) this.tcBasicCostReasonMapper.selectByCondition(tcBasicCostReason);
    }

    @Override
    public Integer selectCountByCondition(BasicCostReason tcBasicCostReason) {
           return  this.tcBasicCostReasonMapper.selectCountByCondition(tcBasicCostReason);
    }

}
